<template>
  <div style="height: 200px;background-color: beige;">
    
学校：{{name}}
地址：{{address}}
<hr>
<Student  v-on:xueshu="adde" name="xiaoyu" :age="18" sex="nan"/>
  </div>
</template>

<script>
import Student from './Student.vue'
export default {
    name:'school',
    data(){
        return{
        name:"hunan",
        address:'hunanchangsha'
        }
    },
    components:{
        Student
    },
    methods:{
        adde(val){
           console.log(val); 
        },
    },
    mounted(){
      this.$root.$on('zong',(val)=>{
        console.log("zheli"+val);
      })
    }
}
</script>

<style>

</style>